﻿// Serotonin -- easy-to-use image filters application
// https://code.google.com/p/serotonin/
//
// Copyright © Frank Nagl, 2012-2013
// admin@franknagl.de
//
namespace Serotonin
{
    /// <summary> Manages the different languages of Serotonin </summary>
    public class Languages
    {
        #region Static variables

        /// <summary>
        /// Gets the english.
        /// </summary>
        /// <value>The english.</value>
        public static string[] English { get; private set; }

        /// <summary>
        /// Gets the german.
        /// </summary>
        /// <value>The german.</value>
        public static string[] German { get; private set; }

        #endregion

        #region Member variables

        /// <summary>
        /// Gets or sets the text.
        /// </summary>
        /// <value>The text.</value>
        public string[] Text { get; set; }

        #endregion

        /// <summary>
        /// Initializes a new instance of the <see cref="Languages"/> class.
        /// </summary>
        public Languages()
        {
            const int numberOfWords = 150;
            English = new string[numberOfWords];
            German = new string[numberOfWords];
            Text = new string[numberOfWords];
            FillEnglish();
            FillGerman();

            //At beginning the prog is german
            Text = German;
        }

        private static void FillEnglish()
        {
            English[0] = "&File";
            English[1] = "&Open image";
            English[2] = "&Save image";
            English[3] = "&Quit Serotonin";
            English[4] = "&Real-time capable filters";
            English[5] = "&Not real-time capable filters";
            English[6] = "No filter";
            English[7] = "Oil painting";
            English[8] = "Colored Canny edge detector";
            English[9] = "ConGrap contour tracer";
            English[10] = "Image sketches";
            English[11] = "Split color space channels";
            English[12] = "This file type is not supported by Serotonin.\n" +
                          "Open Serotonin anyway?";
            English[13] = "Wrong file type";
            English[14] = "Image Files (*.jpg;*.jpeg;*.bmp;*.png;*.emf;*.gif;*.tif;*.tiff;" +
                          "*.wmf)|*.jpg;*.jpeg;*.bmp;*.png;*.emf;*.gif;*.tif;*.tiff;*.wmf";
            English[15] = "New version available. Do you want to update (recommended)?";
            English[16] = "New version available :-)";
            English[17] = "New version available. Do you want to download " + 
                          "it from Serotonin website (recommended)?";
            English[18] = "Dimensions";
            English[19] = "Width";
            English[20] = "Height";
            English[21] = "Realtime processing";
            English[22] = "On";
            English[23] = "Context menu entries are wrong. \n " + 
                          "Do you want to correct them (recommended)?";
            English[24] = "Wrong context menu entries";
            English[25] = "Colored Sobel edge detector";
            English[26] = "Edge drawing";
            English[27] = "Draw modes";
            English[28] = "Normal";
            English[29] = "Colored";
            English[30] = "Black-white";
            English[31] = "Threshold";
            English[32] = "Use Threshold";
            English[33] = "Draw in original image";
            English[34] = "No";
            English[35] = "Yes";
            English[36] = "Line thickness";
            English[37] = "Diameter";
            English[38] = "Colored (by edge orientation)";
            English[39] = "Canny options";
            English[40] = "Serotonin: ";
            English[41] = "No filter used.";
            // ConGrap
            English[42] = "ConGrap options";
            English[43] = "Weight";
            English[44] = "Trace radius";
            English[45] = "Draw modes";
            English[46] = "Dilatation";
            English[47] = "Border rectangles";
            English[48] = "Only border lines";
            English[49] = "Strength";
            English[50] = "Results";
            English[51] = "Number of contours:";
            English[52] = "ConGrap";
            English[53] = "Canny detector";
            // Process groupbox
            English[54] = "Process";
            English[55] = "Apply";
            English[56] = "Reset";
            // General strings I (57-65)
            English[57] = "Options";
            English[58] = "Gaussian Filter parameters";
            English[59] = "Please enter a filename.";
            English[60] = "No filename";
            English[61] = "File already exists. Overwrite file?";
            English[62] = "Overwrite file?";
            English[63] = "Do filtering ... ";
            English[64] = "Please wait, this takes a few seconds.";
            English[65] = null;
            // oil painting form
            English[66] = "Brush size";
            English[67] = "Diameter";
            // original form
            English[68] = "No options";
            // Split color space channels form
            English[69] = "Color space";
            English[70] = "Color channel";
            // ImageSketchManager
            English[71] = "Mouse and keys";
            English[72] = "Left mouse key";
            English[73] = "Middle mouse key";
            English[74] = "Right mouse key";
            English[75] = "Key CTRL";
            English[76] = "Key ESC";
            English[77] = "Select new corner point";
            English[78] = "Remove last sketch";
            English[79] = "Finalize current sketch";
            English[80] = "Connect with other corner points";
            English[81] = "Remove last sketch";
            English[82] = "Sketches";
            // Grayscale form
            English[83] = "Grayscale image";
            English[84] = "Weights of color channels";
            English[85] = "Common algorithms und weights";
            // Sepia form
            English[86] = "Sepia (old brown photo)";
            English[87] = "Coefficients of YIQ color space";
            // Invert form
            English[88] = "Invert";
            // ExtractOrRotateChannels form
            English[89] = "Extract/rotate color channels";
            English[90] = "Channel order";
            // SquareChannel form
            English[91] = "Exponentiate color channels";
            English[92] = "Variant";
            English[93] = "Normal";
            English[94] = "Inverted";
            English[95] = "Threshold";
            English[96] = "Value";
            English[97] = "Use SBIP version";
            // ThresholdAndBinarization form
            English[98] = "Threshold filter and Binary image";
            English[99] = "Filter variant";
            English[100] = "RGB thresholds (no binarization)";
            English[101] = "RGB binary";
            English[102] = "Black-White";
            English[103] = "T threshold (no binarization)";
            English[104] = "Thresholds";
            // GaussianBlur form
            English[105] = "Blurring (Gaussian)";
            English[106] = "Value";
            // Color segmentation form
            English[107] = "Color segmentation";
            English[108] = "Color space";
            English[109] = "Show progress bar";
            English[110] = "Segmentation options";
            English[111] = "Smallest color difference";
            English[112] = "Radius (neighbor pixels)";
            English[113] = "Minimum segment size (in pixels)";
            English[114] = "Result";
            English[115] = "Number of segments:";
            English[116] = "Progress: ";
            English[117] = "Pixels to process: ";
            English[118] = "Detected segments: ";
            English[119] = " Segments.";
            // Meanshift form
            English[120] = "Meanshift filter";
            English[121] = "Minimum shift";
            English[122] = "Maximum iteration";
            English[123] = "Radius";
            English[124] = "Color distance";
            // Convolution form
            English[125] = "Convolution (Unsharpness, Laplace, Blur)";
            English[126] = null; // "Sharpening";
            English[127] = "Edge detection (Laplace)";
            English[128] = "Edge detection (Laplace II)";
            English[129] = "Blurring (Gauß filter)";
            English[130] = "Linear Blurring";
            English[131] = "Kernel";
            English[132] = "Pre-defined convolution filter";
            // UnSharpMasking form
            English[133] = "Gaussian filter and sharpness parameters";
            English[134] = "Intensity of sharpness";
            English[135] = "Sharpness (UnSharp Masking-USM)";
        }

        private static void FillGerman()
        {
            German[0] = "&Datei";
            German[1] = "&Öffne Bild";
            German[2] = "&Speichere Bild";
            German[3] = "&Beende Serotonin";
            German[4] = "&Echtzeitfähige Filter";
            German[5] = "&Nicht-Echtzeitfähige Filter";
            German[6] = "Kein Filter";
            German[7] = "Ölgemälde";
            German[8] = "Farbiger Canny-Kantendetektor";
            German[9] = "ConGrap-Konturdetektor";
            German[10] = "Umrisszeichnung";
            German[11] = "Aufteilung der Farbraumkanäle";
            German[12] = "Dieser Dateityp wird von Serotonin nicht unterstützt.\n" +
                          "Serotonin trotzdem öffnen?";
            German[13] = "Nicht unterstützter Dateityp";
            German[14] = "Bilddateien (*.jpg;*.jpeg;*.bmp;*.png;*.emf;*.gif;*.tif;*.tiff;" +
                          "*.wmf)|*.jpg;*.jpeg;*.bmp;*.png;*.emf;*.gif;*.tif;*.tiff;*.wmf";
            German[15] = "Neue Version verfügbar. Soll das Update " + 
                         "gestartet werden (dringend empfohlen)?";
            German[16] = "Neue Version verfügbar :-)";
            German[17] = "Neue Version verfügbar. Wollen Sie diese von der " +
                         "Serotonin-Website herunterladen (dringend empfohlen)?";
            German[18] = "Abmessungen";
            German[19] = "Breite";
            German[20] = "Höhe";
            German[21] = "Echtzeitberechnung";
            German[22] = "An";
            German[23] = "Kontextmenueinträge sind fehlerheft. \n " +
                         "Sollen sie korrigiert werden (dringend empfohlen)?";
            German[24] = "Falsche oder keine Kontextmenueinträge";
            German[25] = "Farbiger Sobel-Kantendetektor";
            German[26] = "Kantenzeichnung";
            German[27] = "Zeichen-Modi";
            German[28] = "Normal";
            German[29] = "Farbig";
            German[30] = "Schwarz-weiß";
            German[31] = "Schwellwert";
            German[32] = "Nutze Schwellwert";
            German[33] = "Zeichne ins Originalbild";
            German[34] = "Nein";
            German[35] = "Ja";
            German[36] = "Liniendicke";
            German[37] = "Durchmesser";
            German[38] = "Farbig (nach Kantenorientierung)";
            German[39] = "Canny-Einstellungen";
            German[40] = "Serotonin - ";
            German[41] = "Kein Filter verwendet.";
            // ConGrap
            German[42] = "ConGrap-Einstellungen";
            German[43] = "Gewichtung";
            German[44] = "Suchradius";
            German[45] = "Zeichen-Modi";
            German[46] = "Dilatation";
            German[47] = "Begrenzende Rechtecke";
            German[48] = "Nur Grenzlinien";
            German[49] = "Stärke";
            German[50] = "Ergebnis";
            German[51] = "Anzahl gefundener Konturen:";
            German[52] = "ConGrap";
            German[53] = "Canny-Kantendetektor";
            // Process groupbox
            German[54] = "Anwenden";
            German[55] = "Verarbeiten";
            German[56] = "Zurücksetzen";
            // General strings I (57-65)
            German[57] = "Einstellungen";
            German[58] = "Gauß-Filter-Parameter";
            German[59] = "Bitte einen Dateinamen eingeben.";
            German[60] = "Kein Dateiname";
            German[61] = "Datei existiert bereits. Soll sie überschrieben werden?";
            German[62] = "Datei überschreiben?";
            German[63] = "Verarbeite Bildfilter ... ";
            German[64] = "Bitte warten Sie, der Vorgang dauert einige Sekunden.";
            German[65] = null;
            // oil painting form
            German[66] = "Pinselgröße";
            German[67] = "Durchmesser";
            // original form
            German[68] = "Keine Einstellungen";
            // Split color space channels form
            German[69] = "Farbraum";
            German[70] = "Farbkanal";
            // ImageSketchManager
            German[71] = "Maus- und Tastenbelegung";
            German[72] = "Linke Maustaste";
            German[73] = "Mittlere Maustaste";
            German[74] = "Rechte Maustaste";
            German[75] = "Taste STRG";
            German[76] = "Taste ESC";
            German[77] = "Auswählen eines neuen Eckpunktes";
            German[78] = "Löschen des letzten Segments";
            German[79] = "Finalisieren des aktuellen Segments";
            German[80] = "Anknüpfen an anderen Eckpunkt";
            German[81] = "Löschen des letzten Segments";
            German[82] = "Segmente";
            // Grayscale form
            German[83] = "Graustufenbild";
            German[84] = "Gewichtung der Farbkanäle";
            German[85] = "Typische Algorithmen und Gewichtungen";
            // Sepia form
            German[86] = "Sepia (altes braunes Foto)";
            German[87] = "Koeffizienten des YIQ-Farbraumes";
            // Invert form
            German[88] = "Invertieren";
            // ExtractOrRotateChannels form
            German[89] = "Extrahieren/Rotieren der Farbkanäle";
            German[90] = "Reihenfolge";
            // ExponentiateChannels form
            German[91] = "Potenzieren der Farbkanäle";
            German[92] = "Variante";
            German[93] = "Normal";
            German[94] = "Invertiert";
            German[95] = "Grenzwert";
            German[96] = "Wert";
            German[97] = "Verwende SBIP-Version";
            // ThresholdAndBinarization form
            German[98] = "Schwellwertfilter und Binärbild";
            German[99] = "Filtervariante";
            German[100] = "RGB-Grenzwerte (keine Binarisierung)";
            German[101] = "RGB-Binarisierung";
            German[102] = "Schwarz-Weiß-Binarisierung";
            German[103] = "T-Grenzwert (keine Binarisierung)";
            German[104] = "Grenzwerte";
            // GaussianBlur form
            German[105] = "Unschärfe (Gauß-Glättung)";
            German[106] = "Wert";
            // Color segmentation form
            German[107] = "Farbsegmentierung";
            German[108] = "Farbraum";
            German[109] = "Zeige Fortschrittsbalken";
            German[110] = "Segmentierungseinstellungen";
            German[111] = "Kleinster Farbabstand";
            German[112] = "Radius (Nachbarpixel)";
            German[113] = "Mindest-Segmentgröße (in Pixeln)";
            German[114] = "Ergebnis";
            German[115] = "Anzahl Segmente:";
            German[116] = "Fortschritt: ";
            German[117] = "Noch offene Pixel: ";
            German[118] = "Erkannte Segmente: ";
            German[119] = " Segmente.";
            // Meanshift form
            German[120] = "Meanshift-Filter";
            German[121] = "Minimale Verschiebung (Shift)";
            German[122] = "Maximale Iteration";
            German[123] = "Radius";
            German[124] = "Farbabstand";
            // Convolution form
            German[125] = "Faltung (Unschärfe, Laplace, Weichzeichnen)";
            German[126] = null; // "Bildschärfung";
            German[127] = "Kantendetektion (Laplace)";
            German[128] = "Kantendetektion (Laplace II)";
            German[129] = "Unschärfe/Weichzeichnen (Gauß-Filter)";
            German[130] = "Lineare Unschärfe/Weichzeichnung";
            German[131] = "Filterkern";
            German[132] = "Vordefinierte Faltungs-Filter";
            // UnSharpMasking form
            German[133] = "Gauß-Filter- und Schärfe-Parameter";
            German[134] = "Stärke der Schärfung";
            German[135] = "Schärfen (Unscharfe Maskierung-USM)";
        }
    }
}
